import React,{Fragment} from 'react';
import {BrowserRouter as Router,Routes,Route} from 'react-router-dom';
import Layout from '@/layout/layout';
import ClassComponent from '@/views/classComponents/classParent';
import Classcomponents from "@/views/classComponents/2Class";
import UserState from "@/views/hooksComponents/useState";
import UseRef from "@/views/hooksComponents/useRef";
import UseTransition from "@/views/hooksComponents/useTransition";
import UseDefferredValue from "@/views/hooksComponents/useDefferredValue";
import Gouwuche from "@/views/gouwuche";
import Protals from "@/views/portal";
import AntMessage from "@/views/portal/antMessage.tsx";
import Lazy from "@/views/lazy";
import Errors from "@/views/errorBoundary/ErrorHandler.tsx";
function AppRouter() {
    return (
        <Fragment>
            <Router>
                <Routes>
                    <Route path="/" element={<Layout />}>
                        <Route path="/" element={<h1>Home</h1>} />
                        <Route path="about" element={<h1>About</h1>} />
                        <Route path="/contact" element={<h1>Contact</h1>} />
                        <Route path="/Class" element={<ClassComponent />} />
                        <Route path="/ClassS" element={<Classcomponents/>} />
                        <Route path="useState" element={<UserState />} />
                        <Route path="UseRef" element={<UseRef />} />
                        <Route path="UseTransition" element={<UseTransition />} />
                        <Route path="UseDefferredValue" element={<UseDefferredValue />} />
                        <Route path="gouwuche" element={<Gouwuche />} />
                        <Route path="/protal" element={<Protals />} />
                        <Route path="/AntMessage" element={<AntMessage />} />
                        <Route path="/lazy" element={<Lazy />} />
                        <Route path="/errorBoundary" element={<Errors />} />
                    </Route>
                </Routes>
            </Router>
        </Fragment>
    )
}

export default AppRouter;